<?php
class Drink_model extends CI_Model
{
    private $_table = 'drink';
    function __construct()
    {
        parent::__construct();
    }
    function add($data){
        return $this->db->insert($this->_table,$data);
    }
    function edit($data,$where){
        $this->db->where($where);
        return $this->db->update($this->_table,$data);
    }
    function get_only($where){
        return $this->db->get_where($this->_table,$where)->row_array();
    }
    function get_all($user){
        return $this->db->get_where($this->_table,$user)->result_array();
    }function delete($column,$where){
        $this->db->where_in($column,$where);
        return $this->db->delete($this->_table);
    }
    function get_item($where){
        return $this->db->get_where($this->_table,$where)->row_array();
    }
}
?>